package com.xhai.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xhai.common.domain.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <p>
 * 资源（菜单、按钮）表
 * </p>
 *
 * @author xhai
 * @since 2025-05-24
 */
@Getter
@Setter
@ToString
@TableName("sys_resource")
@Schema(name = "SysResource", description = "资源（菜单、按钮）表")
public class SysResource extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 资源ID
     */
    @Schema(description = "资源ID")
    @TableId(value = "RESOURCE_ID", type = IdType.ASSIGN_ID)
    private Long resourceId;

    /**
     * 资源编码
     */
    @TableField("RESOURCE_CODE")
    @Schema(description = "资源编码")
    private String resourceCode;

    /**
     * 资源名称
     */
    @TableField("RESOURCE_NAME")
    @Schema(description = "资源名称")
    private String resourceName;

    /**
     * 备注
     */
    @TableField("REMARK")
    @Schema(description = "备注")
    private String remark;

    /**
     * 资源类型（C目录，M菜单，B按钮）
     */
    @TableField("TYPE")
    @Schema(description = "资源类型（C目录，M菜单，B按钮）")
    private String type;

    /**
     * 显示顺序
     */
    @TableField("ORDER_NUM")
    @Schema(description = "显示顺序")
    private Integer orderNum;

    /**
     * 资源地址
     */
    @TableField("RESOURCE_URL")
    @Schema(description = "资源地址")
    private String resourceUrl;

    /**
     * 图标
     */
    @TableField("ICON")
    @Schema(description = "图标")
    private String icon;

    /**
     * 上级资源ID
     */
    @TableField("PARENT_ID")
    @Schema(description = "上级资源ID")
    private Long parentId;
}
